package org.bbs.demo.user.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.bbs.demo.user.dto.UserLoginDto;

@Mapper
public interface UserLoginDao {

    // 通过 uid & password 查找
    @Select("select mail from bbsusers where user_id = #{userAccount} and password = #{password}")
    public String getUserMailByUidAndPwd(UserLoginDto userLoginDto);

    // 通过 mail & password 查找
    @Select("select user_id from bbsusers where mail = #{userAccount} and password = #{password}")
    public String getUserIdByMailAndPwd(UserLoginDto userLoginDto);

}
